package com.quanyan.stadium.enums;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by xiaoxiao on 16/6/2.
 *
 * 赛制类型配置
 */
public enum GameSystemConfigEnum implements BaseEnum{

    CONFIG_GAME_TYPE_WASHED(1, "GAME_TYPE_WASHED", "赛制类型","淘汰赛"), // 赛程分
    CONFIG_GAME_TYPE_CIRCLE(2, "GAME_TYPE_CIRCLE", "赛制类型","循环赛"),  // 只给积分
    CONFIG_GAME_TYPE_MIXED(3, "GAME_TYPE_MIXED", "赛制类型","混合赛"),  //  都有
    CONFIG_GAME_TYPE_SWISS(4, "GAME_TYPE_SWISS", "赛制类型","等位制"), // 积分
    CONFIG_GAME_TYPE_UNSET_RULE(5, "CONFIG_GAME_TYPE_UNSET_RULE", "赛制类型","5-8不固定打法"),// 不固定打法
    CONFIG_GAME_TYPE_PK(6, "GAME_TYPE_EIGHT_DOUBLE", "赛制类型","对抗赛"),// 积分
    CONFIG_GAME_TYPE_EIGHT_RULE(7, "CONFIG_GAME_TYPE_EIGHT_RULE", "赛制类型","8人抢签赛");


    private Integer id;

    private String code;

    private String name;

    private String label;

    GameSystemConfigEnum(int id, String code, String name, String label){
        this.id = id;
        this.code = code;
        this.name = name;
        this.label = label;
    }

    @Override
    public int getId() {
        return this.id;
    }

    @Override
    public String getCode() {
        return this.code;
    }

    @Override
    public String getName() {
        return this.name;
    }

    @Override
    public String getLabel() {
        return this.label;
    }

    public static Map<String,String> getSysConfigEnum(){
        Map<String,String> sysConfigMap = new HashMap<String,String>();
        for (GameSystemConfigEnum tmpEnum : GameSystemConfigEnum.values()) {
            sysConfigMap.put(tmpEnum.getCode(), tmpEnum.getName());
        }
        return sysConfigMap;
    }
}
